﻿@model SAKS.Models.ProjectProcess

@{
    ViewBag.Title = "添加项目进展";
    Layout = "~/Views/Project/_ProjectLayout.cshtml";
}

<h3>添加项目进展</h3>

<link href="@Url.Content("~/Content/themes/base/validationEngine.jquery.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validationEngine.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine-ch.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("form").validationEngine();
        $("input[type='submit']").button();
        $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            yearRange: '1949:2010',
            dateFormat: 'yy-mm-dd',
            dayNames: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
            dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
            monthNamesShort: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
        });
    });
</script>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <input type="hidden" id="projectId" name="projectId" value="@ViewBag.ProjectId" />
    <div class="inner">
            <div class="editor-label">
            @Html.LabelFor(model => model.AnnulReachContent)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AnnulReachContent)
            @Html.ValidationMessageFor(model => model.AnnulReachContent)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AnnulMajorMark)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AnnulMajorMark)
            @Html.ValidationMessageFor(model => model.AnnulMajorMark)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ManagementType)
        </div>
        @{
            var typelist = new List<SelectListItem>(){
                new SelectListItem(){Value="中期审核",Text="中期审核",Selected = true},
                new SelectListItem(){Value="项目结题",Text="项目结题"}
            };
        }
        <div class="editor-field">
            @Html.ListBoxFor(model => model.ManagementType, typelist, new { multiple = "false" })
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ArchivedDate)
        </div>
        <div class="editor-field">
            <input class="text-box single-line datepicker validate[date]" id="ArchivedDate" name="ArchivedDate" type="text" value="@(Model != null ? Model.ArchivedDate.Value.ToString("yyyy-MM-dd"):"")" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CheckDate)
        </div>
        <div class="editor-field">
             <input class="text-box single-line datepicker validate[date]" id="CheckDate" name="CheckDate" type="text" value="@(Model != null ? Model.CheckDate.Value.ToString("yyyy-MM-dd"):"")" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Remarks)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Remarks)
            @Html.ValidationMessageFor(model => model.Remarks)
        </div>

        <div class="editor-field">
            @Html.HiddenFor(model => model.Version)
        </div>

        <p>
            <input type="submit" value="保存" />
        </p>
        </div>

}

<div>
    @Html.ActionLink("返回", "Process", new { Id = ViewBag.ProjectId })
</div>

